package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.ZzxxCourse;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ZzxxCourseMapper;
import com.ruoyi.system.service.IZzxxCourseService;

/**
 * 课程表Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-06-21
 */
@Service
public class ZzxxCourseServiceImpl implements IZzxxCourseService 
{
    @Autowired
    private ZzxxCourseMapper zzxxCourseMapper;

    /**
     * 查询课程表
     * 
     * @param courseId 课程表主键
     * @return 课程表
     */
    @Override
    public ZzxxCourse selectZzxxCourseByCourseId(Long courseId)
    {
        return zzxxCourseMapper.selectZzxxCourseByCourseId(courseId);
    }

    /**
     * 查询课程表列表
     * 
     * @param zzxxCourse 课程表
     * @return 课程表
     */
    @Override
    public List<ZzxxCourse> selectZzxxCourseList(ZzxxCourse zzxxCourse)
    {
        return zzxxCourseMapper.selectZzxxCourseList(zzxxCourse);
    }

    /**
     * 新增课程表
     * @param zzxxCourse 课程表
     * @return 结果
     */
    @Override
    public int insertZzxxCourse(ZzxxCourse zzxxCourse)
    {
        zzxxCourse.setCreateTime(DateUtils.getNowDate());
        return zzxxCourseMapper.insertZzxxCourse(zzxxCourse);
    }

    /**
     * 修改课程表
     * 
     * @param zzxxCourse 课程表
     * @return 结果
     */
    @Override
    public int updateZzxxCourse(ZzxxCourse zzxxCourse)
    {
        zzxxCourse.setUpdateTime(DateUtils.getNowDate());
        return zzxxCourseMapper.updateZzxxCourse(zzxxCourse);
    }

    /**
     * 批量删除课程表
     * 
     * @param courseIds 需要删除的课程表主键
     * @return 结果
     */
    @Override
    public int deleteZzxxCourseByCourseIds(Long[] courseIds)
    {
        return zzxxCourseMapper.deleteZzxxCourseByCourseIds(courseIds);
    }

    /**
     * 删除课程表信息
     * 
     * @param courseId 课程表主键
     * @return 结果
     */
    @Override
    public int deleteZzxxCourseByCourseId(Long courseId)
    {
        return zzxxCourseMapper.deleteZzxxCourseByCourseId(courseId);
    }
}
